\hypertarget{group___e_e_p_r_o_m___emulation}{}\section{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}
\label{group___e_e_p_r_o_m___emulation}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
uint16\+\_\+t \hyperlink{group___e_e_p_r_o_m___emulation_ga83834957567411c76bb7f659cf8a1a38}{E\+E\+\_\+\+Init} (void)
\begin{DoxyCompactList}\small\item\em Restore the pages to a known good state in case of page\textquotesingle{}s status corruption after a power loss. \end{DoxyCompactList}\item 
uint16\+\_\+t \hyperlink{group___e_e_p_r_o_m___emulation_ga0776e2e16f54d3a675e4f2f401703a85}{E\+E\+\_\+\+Read\+Variable} (uint16\+\_\+t Virt\+Address, uint16\+\_\+t $\ast$Data)
\begin{DoxyCompactList}\small\item\em Returns the last stored variable data, if found, which correspond to the passed virtual address. \end{DoxyCompactList}\item 
uint16\+\_\+t \hyperlink{group___e_e_p_r_o_m___emulation_ga516e9ced7438b9452c72884aa1df5915}{E\+E\+\_\+\+Write\+Variable} (uint16\+\_\+t Virt\+Address, uint16\+\_\+t Data)
\begin{DoxyCompactList}\small\item\em Writes/upadtes variable data in E\+E\+P\+R\+O\+M. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
uint16\+\_\+t \hyperlink{group___e_e_p_r_o_m___emulation_ga3d172691f05ea6e584b3d19f5900333c}{Data\+Var} = 0
\item 
uint16\+\_\+t \hyperlink{group___e_e_p_r_o_m___emulation_ga1fb74b26daf6fdfa3dc85e4232ef4769}{Virt\+Add\+Var\+Tab} \mbox{[}\hyperlink{eeprom_8h_a8bae73a7ce70b5cae64c6e0d485daa2f}{N\+B\+\_\+\+O\+F\+\_\+\+V\+A\+R}\mbox{]}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\hypertarget{group___e_e_p_r_o_m___emulation_ga83834957567411c76bb7f659cf8a1a38}{}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}!E\+E\+\_\+\+Init@{E\+E\+\_\+\+Init}}
\index{E\+E\+\_\+\+Init@{E\+E\+\_\+\+Init}!E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsubsection[{E\+E\+\_\+\+Init(void)}]{\setlength{\rightskip}{0pt plus 5cm}uint16\+\_\+t E\+E\+\_\+\+Init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group___e_e_p_r_o_m___emulation_ga83834957567411c76bb7f659cf8a1a38}


Restore the pages to a known good state in case of page\textquotesingle{}s status corruption after a power loss. 


\begin{DoxyParams}{Parameters}
{\em None.} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em -\/} & Flash error code\+: on write Flash error
\begin{DoxyItemize}
\item F\+L\+A\+S\+H\+\_\+\+C\+O\+M\+P\+L\+E\+T\+E\+: on success 
\end{DoxyItemize}\\
\hline
\end{DoxyRetVals}
\hypertarget{group___e_e_p_r_o_m___emulation_ga0776e2e16f54d3a675e4f2f401703a85}{}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}!E\+E\+\_\+\+Read\+Variable@{E\+E\+\_\+\+Read\+Variable}}
\index{E\+E\+\_\+\+Read\+Variable@{E\+E\+\_\+\+Read\+Variable}!E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsubsection[{E\+E\+\_\+\+Read\+Variable(uint16\+\_\+t Virt\+Address, uint16\+\_\+t $\ast$\+Data)}]{\setlength{\rightskip}{0pt plus 5cm}uint16\+\_\+t E\+E\+\_\+\+Read\+Variable (
\begin{DoxyParamCaption}
\item[{uint16\+\_\+t}]{Virt\+Address, }
\item[{uint16\+\_\+t $\ast$}]{Data}
\end{DoxyParamCaption}
)}\label{group___e_e_p_r_o_m___emulation_ga0776e2e16f54d3a675e4f2f401703a85}


Returns the last stored variable data, if found, which correspond to the passed virtual address. 


\begin{DoxyParams}{Parameters}
{\em Virt\+Address} & Variable virtual address \\
\hline
{\em Data} & Global variable contains the read variable value \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em Success} & or error status\+:
\begin{DoxyItemize}
\item 0\+: if variable was found
\item 1\+: if the variable was not found
\item N\+O\+\_\+\+V\+A\+L\+I\+D\+\_\+\+P\+A\+G\+E\+: if no valid page was found. 
\end{DoxyItemize}\\
\hline
\end{DoxyRetVals}
\hypertarget{group___e_e_p_r_o_m___emulation_ga516e9ced7438b9452c72884aa1df5915}{}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}!E\+E\+\_\+\+Write\+Variable@{E\+E\+\_\+\+Write\+Variable}}
\index{E\+E\+\_\+\+Write\+Variable@{E\+E\+\_\+\+Write\+Variable}!E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsubsection[{E\+E\+\_\+\+Write\+Variable(uint16\+\_\+t Virt\+Address, uint16\+\_\+t Data)}]{\setlength{\rightskip}{0pt plus 5cm}uint16\+\_\+t E\+E\+\_\+\+Write\+Variable (
\begin{DoxyParamCaption}
\item[{uint16\+\_\+t}]{Virt\+Address, }
\item[{uint16\+\_\+t}]{Data}
\end{DoxyParamCaption}
)}\label{group___e_e_p_r_o_m___emulation_ga516e9ced7438b9452c72884aa1df5915}


Writes/upadtes variable data in E\+E\+P\+R\+O\+M. 


\begin{DoxyParams}{Parameters}
{\em Virt\+Address} & Variable virtual address \\
\hline
{\em Data} & 16 bit data to be written \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em Success} & or error status\+:
\begin{DoxyItemize}
\item F\+L\+A\+S\+H\+\_\+\+C\+O\+M\+P\+L\+E\+T\+E\+: on success
\item P\+A\+G\+E\+\_\+\+F\+U\+L\+L\+: if valid page is full
\item N\+O\+\_\+\+V\+A\+L\+I\+D\+\_\+\+P\+A\+G\+E\+: if no valid page was found
\item Flash error code\+: on write Flash error 
\end{DoxyItemize}\\
\hline
\end{DoxyRetVals}


\subsection{Variable Documentation}
\hypertarget{group___e_e_p_r_o_m___emulation_ga3d172691f05ea6e584b3d19f5900333c}{}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}!Data\+Var@{Data\+Var}}
\index{Data\+Var@{Data\+Var}!E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsubsection[{Data\+Var}]{\setlength{\rightskip}{0pt plus 5cm}uint16\+\_\+t Data\+Var = 0}\label{group___e_e_p_r_o_m___emulation_ga3d172691f05ea6e584b3d19f5900333c}
\hypertarget{group___e_e_p_r_o_m___emulation_ga1fb74b26daf6fdfa3dc85e4232ef4769}{}\index{E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}!Virt\+Add\+Var\+Tab@{Virt\+Add\+Var\+Tab}}
\index{Virt\+Add\+Var\+Tab@{Virt\+Add\+Var\+Tab}!E\+E\+P\+R\+O\+M\+\_\+\+Emulation@{E\+E\+P\+R\+O\+M\+\_\+\+Emulation}}
\subsubsection[{Virt\+Add\+Var\+Tab}]{\setlength{\rightskip}{0pt plus 5cm}uint16\+\_\+t Virt\+Add\+Var\+Tab\mbox{[}{\bf N\+B\+\_\+\+O\+F\+\_\+\+V\+A\+R}\mbox{]}}\label{group___e_e_p_r_o_m___emulation_ga1fb74b26daf6fdfa3dc85e4232ef4769}
